import {createApp} from 'vue';
import './style.css';
import App from './App.vue';
import router from "./router";
import {createPinia} from 'pinia';
import '@/mock/index.ts';
import {createI18n} from "vue-i18n";
import messages from './utils/i18n';
// import * as ElementPlusIconsVue from '@element-plus/icons-vue';

const i18n: any = createI18n({
    legacy: false,
    messages,
    locale: 'zh'
})

const app = createApp(App);

// 全局注册element plus icons
// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//     app.component(key, component)
// }
app.provide('global_router_variable', 'hello!')

app.use(router).use(createPinia()).use(i18n).mount('#app');
